<template>
  <div class="order-container">
    <div class="header">
      <div class="search">
        <el-input v-model="value" placeholder="请输入订单号">
          <i slot="prefix" class="el-input__icon el-icon-search"></i>
        </el-input>
      </div>
      <div class="date">
        <el-date-picker
          v-model="value2"
          type="daterange"
          align="right"
          unlink-panels
          range-separator="至"
          start-placeholder="开始日期"
          end-placeholder="结束日期"
          :picker-options="pickerOptions"
        >
        </el-date-picker>
      </div>
      <el-button>查询</el-button>
    </div>
    <div class="table">
      <el-table :data="tableData" style="width: 100%">
        <el-table-column prop="date" label="订单号" width="180">
        </el-table-column>
        <el-table-column prop="name" label="订单状态" width="180">
        </el-table-column>
        <el-table-column prop="address" label="用户"> </el-table-column>
        <el-table-column prop="address" label="手机号"> </el-table-column>
        <el-table-column prop="address" label="地址"> </el-table-column>
        <el-table-column prop="address" label="下单时间"> </el-table-column>
        <el-table-column prop="address" label="实收金额"> </el-table-column>
        <el-table-column prop="address" label="操作"> </el-table-column>
      </el-table>
    </div>
    <div class="footer">
      <el-pagination
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
        :current-page="pageInfo.page"
        :page-sizes="[10, 20, 30, 40]"
        :page-size="pageInfo.pageSize"
        layout="total, sizes, prev, pager, next, jumper"
        :total="total"
      >
      </el-pagination>
    </div>
  </div>
</template>

<script>
export default {
  name: 'Order',
  data () {
    return {
      value: '',
      pageInfo: { page: 1, pageSize: 10 },
      total: 0
    }
  }
}
</script>

<style lang="scss" scoped>
@import '@/styles/variables.scss';
.order-container {
  width: auto;
  padding: 20px;
  margin: 20px;
  .header {
    display: flex;

    margin-bottom: 20px;
    .search {
      width: 300px;
    }
    .date {
      margin: 0 20px;
    }
    .el-button {
      background-color: $darkorange;
      &:hover {
        background-color: $lightorange;
        color: $darkblack;
      }
    }
  }
  .footer {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
  }
}
</style>
